CARTOPY_Projections


In [ ]:
%matplotlib inline
import matplotlib.pyplot as plt
import cartopy.crs as ccrs

PlateCarree

projection list

class cartopy.crs.PlateCarree(central_longitude=0.0, globe=None)[source]

In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.PlateCarree())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();
  • set the central longitude to $180^\circ$

In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.PlateCarree(central_longitude=180))
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();

AzimuthalEquidistant

projection list

LambertConformal

projection list

class cartopy.crs.LambertConformal(central_longitude=-96.0, central_latitude=39.0, false_easting=0.0, false_northing=0.0, secant_latitudes=None, standard_parallels=None, globe=None, cutoff=-30)

A Lambert Conformal conic projection.

Kwargs:

  • central_longitude - The central longitude. Defaults to 0.

  • central_latitude - The central latitude. Defaults to 0.

  • false_easting - X offset from planar origin in metres. Defaults to 0.

  • false_northing - Y offset from planar origin in metres. Defaults to 0.

  • standard_parallels - Standard parallel latitude(s). Defaults to (33, 45).

  • globe - A cartopy.crs.Globe. If omitted, a default globe is created.

  • cutoff - Latitude of map cutoff. The map extends to infinity opposite the central pole so we must cut off the map drawing before then. A value of 0 will draw half the globe. Defaults to -30.


In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.LambertConformal())
ax.coastlines(resolution='110m')
ax.gridlines();

LambertCylindrical

projection list

class cartopy.crs.LambertCylindrical(central_longitude=0.0)

In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.LambertCylindrical())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();

Mercator

projection list

class cartopy.crs.Mercator(central_longitude=0.0, min_latitude=-80.0, max_latitude=84.0, globe=None)

A Mercator projection.

Kwargs:

  • central_longitude - the central longitude. Defaults to 0.

  • min_latitude - the maximum southerly extent of the projection. Defaults to -80 degrees.

  • max_latitude - the maximum northerly extent of the projection. Defaults to 84 degrees.

  • globe - A cartopy.crs.Globe. If omitted, a default globe is created.


In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.Mercator())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();

Miller

projection list

class cartopy.crs.Miller(central_longitude=0.0)

In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.Miller())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();

Mollweide

projection list

class cartopy.crs.Mollweide(central_longitude=0, globe=None)

In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.Mollweide())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();

Orthographic

projection list

class cartopy.crs.Orthographic(central_longitude=0.0, central_latitude=0.0, globe=None)

In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.Orthographic())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();

Robinson

projection list

class cartopy.crs.Robinson(central_longitude=0, globe=None)

In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.Robinson())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();

Stereographic

projection list

class cartopy.crs.Stereographic(central_latitude=0.0, central_longitude=0.0, false_easting=0.0, false_northing=0.0, true_scale_latitude=None, globe=None)

In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.Stereographic())
ax.coastlines(resolution='110m')
ax.gridlines();

TransverseMercator

projection list

class cartopy.crs.TransverseMercator(central_longitude=0.0, central_latitude=0.0, false_easting=0.0, false_northing=0.0, scale_factor=1.0, globe=None)

A Transverse Mercator projection.

Kwargs:

  • central_longitude - The true longitude of the central meridian in degrees. Defaults to 0.

  • central_latitude - The true latitude of the planar origin in degrees. Defaults to 0.

  • false_easting - X offset from the planar origin in metres. Defaults to 0.

  • false_northing - Y offset from the planar origin in metres. Defaults to 0.

  • scale_factor - Scale factor at the central meridian. Defaults to 1.

  • globe - An instance of cartopy.crs.Globe. If omitted, a default globe is created.


In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.TransverseMercator())
ax.coastlines(resolution='110m')
ax.gridlines();

UTM

projection list

class cartopy.crs.UTM(zone, southern_hemisphere=False, globe=None)

Universal Transverse Mercator projection.

Kwargs:

  • zone - the numeric zone of the UTM required.

  • globe - An instance of cartopy.crs.Globe. If omitted, a default globe is created.

  • southern_hemisphere - set to True if the zone is in the southern hemisphere, defaults to False.

plt.figure(figsize=(3, 3)) ax = plt.axes(projection=ccrs.UTM(zone=18)) ax.coastlines(resolution='110m') ax.gridlines()

InterruptedGoodeHomolosine

projection list

class cartopy.crs.InterruptedGoodeHomolosine(central_longitude=0, globe=None)

In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.InterruptedGoodeHomolosine())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();

RotatedPole

projection list

class cartopy.crs.RotatedPole(pole_longitude=0.0, pole_latitude=90.0, central_rotated_longitude=0.0, globe=None)

Defines a rotated latitude/longitude projected coordinate system with cylindrical topology and projected distance.

Coordinates are measured in projection metres.

Create a RotatedPole CRS.

The class uses proj4 to perform an ob_tran operation, using the pole_longitude to set a lon_0 then performing two rotations based on pole_latitude and central_rotated_longitude. This is equivalent to setting the new pole to a location defined by the pole_latitude and pole_longitude values in the GeogCRS defined by globe, then rotating this new CRS about it’s pole using the central_rotated_longitude value.

Args:

  • pole_longitude - Pole longitude position, in unrotated degrees.

  • pole_latitude - Pole latitude position, in unrotated degrees.

  • central_rotated_longitude - Longitude rotation about the new pole, in degrees.

Kwargs:

  • globe - An optional cartopy.crs.Globe. Defaults to a “WGS84” datum.

In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.RotatedPole(pole_latitude=37.5, pole_longitude=177.5))
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();

OSGB

projection list

class cartopy.crs.OSGB


In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.OSGB())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();

EuroPP

projection list

class cartopy.crs.EuroPP

UTM Zone 32 projection for EuroPP domain.

Ellipsoid is International 1924, Datum is ED50.


In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.EuroPP())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();

Geostationary

projection list

class cartopy.crs.Geostationary(central_longitude=0.0, satellite_height=35785831, false_easting=0, false_northing=0, globe=None)

In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.Geostationary())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();

Gnomonic

projection list

class cartopy.crs.Gnomonic(central_latitude=0.0, globe=None)

In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.Gnomonic())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();

NorthPolarStereo

projection list

class cartopy.crs.NorthPolarStereo(central_longitude=0.0, globe=None)

In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.NorthPolarStereo())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();

OSNI

projection list

class cartopy.crs.OSNI


In [ ]:
# note:
# coastlines methods can use several resolution (110m, 50m, 10m)
# for convenience here we use 110m
# see :
# ax.coastlines?

In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.OSNI())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();

SouthPolarStereo

projection list

class cartopy.crs.SouthPolarStereo(central_longitude=0.0, globe=None)


In [ ]:
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.SouthPolarStereo())
ax.coastlines(resolution='110m')
ax.stock_img()
ax.gridlines();